﻿Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D
Public Class LandschaftstexturStrand
    Inherits ObjektLandschaftsTextur

    Dim Mesh As Objekt3D

    Public Sub New()
        ID = "STRAND"
        Landschaftsname = "Strand"
        Deckung = 0
        Tarnung = False
        KP = -1
        Select Case My.Settings.TerrainStyle
            Case TerrainStyle.AdvanceWarsDC, TerrainStyle.CommanderWars2
                Frame = False
            Case Else
                Frame = True
        End Select
        TexturenLaden(New String() {"Strand", "Strand+N", "Strand+N+O", "Strand+N+O+S", "Strand", "Strand+N+O+W", "Strand+N+S+W", "Strand+N+W", "Strand+O", "Strand+O+S", "Strand+O+S+W", "Strand+S", "Strand+S+W", "Strand+W", "Strand+N+O+S+W", "STRAND+N+S", "STRAND+O+W"})
        Normal = 0
        Ausrichtungslandschaften = New String() {"EBENE", "TEMPWERFT", "TEMPFLUGHAFEN", "PLASMA", "FEUER", "METEOR", "ÖDLAND", "RUINE", "SUMPF", "WALD", "BERG", "STRAßE", "WÜSTE", "PIPELINE", "EBENE+SCHROTT", "HQ", "STADT", "BASIS", "WERFT", "FLUGHAFEN", "TURM", "SCHWEIßNAHT", "LASER", "MONOLITH", "MAUER", "PIPE", "PIPESCHWEIß", "FABRIK", "KAPUTTEPIPESCHWEIß", "KAPUTTESCHWEIßNAHT", "KAKTEEN", "FELSEN", "AUSGETROCKNETESFLUSSBETT", "PFAD", "FLUSS", "MINIGESCHÜTZ+N", "MINIGESCHÜTZ+O", "MINIGESCHÜTZ+S", "MINIGESCHÜTZ+W", "SCHWARZE GESCHÜTZ+N", "SCHWARZE GESCHÜTZ+O", "SCHWARZE GESCHÜTZ+S", "SCHWARZE GESCHÜTZ+W", "VULKAN", "FESTUNG", "OMEGARAKETE", "ZUGBRÜCKE", "MINE", "WÜSTE+SCHROTT", "SCHNEE+SCHROTT", "RAKETENSILO+RAKETE", "RAKETENSILO", "SCHNEE", "KIEFERN", "GIPFEL", "STRAßENFROST", "PLINEKAPUTT", "PLINE", "PLINESCHWEIß", "SCHOCKLASER+N", "SCHOCKLASER+O", "SCHOCKLASER+S", "SCHOCKLASER+W"}
        ÜbergängeLaden("Strand")
        If My.Settings.draw3D Then
            Ini3D()
        End If
    End Sub

    Public Overrides Function DrawSpecialStyle(ByVal BildID As Integer, ByVal Fog As Nebelarten, ByVal Alpha As Integer, ByVal X As Integer, ByVal Y As Integer) As Boolean
        Select Case My.Settings.TerrainStyle
            Case TerrainStyle.AdvanceWarsDC
                Return DrawSeeUndTerrain(Alpha, Fog, BildID, X, Y, 0)
            Case TerrainStyle.CommanderWars2
                Return DrawSeeUndTerrain(Alpha, Fog, BildID, X, Y, 0)
            Case Else
                Return False
        End Select
    End Function

    Public Overrides Sub Malen3D(ByVal p_MatCube As Microsoft.DirectX.Matrix, ByVal Landschaft As ObjektLandschaft)
        Dim standardMatrix As Matrix = Grafikengine.Grafikkarte.Transform.World
        Grafikengine.Grafikkarte.Transform.World = p_MatCube

        Objekt3D.SpielerFarbe = ObjektmarkiertesFeld.getFeldFarbe(Landschaft.KooX, Landschaft.KooY)
        Mesh.Malen(p_MatCube)
        Malen3D(p_MatCube, "SEE", Landschaft)

        Grafikengine.Grafikkarte.Transform.World = standardMatrix
    End Sub

    Public Overrides Sub Ini3D()
        Mesh = New Objekt3D
        Mesh.MeshBildLaden(My.Settings.Resourcenpfad + "Landschaften\Meshes\Strand.X")
    End Sub

    Public Overrides Sub Tick()

    End Sub
End Class
